import Vue from 'vue'
import Router from 'vue-router'

// 一级路由
import Home from './../pages/home/home'
import Login from './../pages/login/login'


//二级路由
  import Welcome from './../pages/welcome/welcome'
  // 用户管理
  import Customer from './../pages/customer/customer';//用户列表
  //帖子管理
  import Post from './../pages/post/post';//帖子列表
  import PostType from './../pages/post/postType';//帖子类型
  import PostTypeAll from './../pages/post/postTypeAll';//帖子类型管理
  import PostDetail from './../pages/post/postDetail';//帖子详情页
  import SendPost from './../pages/post/sendPost';//发帖
  import PostComment from './../pages/post/postComment';//评论列表
  //圈子管理
  import Circle from './../pages/circle/circle';//圈子列表
  import CircleType from './../pages/circle/circleType';//圈子类型
  import CircleAdmin from './../pages/circle/circleAdmin';//圈子管理员
  import CircleExamine from './../pages/circle/circleExamine';//圈子审核
  
  

  //信息管理
  import SystemMsgList from './../pages/message/systemMsgList';//系统信息管理
  import SystemMsgEditor from './../pages/message/systemMsgEditor';//系统信息编辑
  import Report from './../pages/message/report';//举报消息
  import ReportList from './../pages/message/reportList/reportList';//举报列表
  import ReportReason from './../pages/message/reportReason/reportReason';//举报理由

  // 等级管理
  import Experience from './../pages/experience/experience';//经验值与等级


  //运营管理
  import Intergal from './../pages/business/intergal/intergal';//积分兑换
  import ExchangeList from './../pages/business/intergal/exchangeList/exchangeList';//商品列表
  import GoodsDetail from './../pages/business/intergal/goodsList/goodsDetail';//商品详情详情
  import OrderDetail from './../pages/business/intergal/exchangeList/orderDetail';//订单详情
  import GoodsList from './../pages/business/intergal/goodsList/goodsList';//兑换列表
  import GoodsEditor from './../pages/business/intergal/goodsList/goodsEditor';//编辑商品
  import GoodsBanner from './../pages/business/intergal/goodsList/goodsBanner';//商品轮播图
  import Account from './../pages/business/account/account';//运营账号
  

  //系统管理
  import Administrator from './../pages/system/administrator';//管理员
  import Character from './../pages/system/character';//角色权限
  import Banner from './../pages/system/banner';//轮播图管理
  import BannerHomepage from './../pages/system/bannerHomepage/bannerHomepage';//首页轮播图管理
  import BannerPersonpage from './../pages/system/bannerPersonpage/bannerPersonpage';//个人主页轮播图管理
Vue.use(Router)

export default new Router({
  routes: [
    {
      path:'/login',
      component: Login,
      name: 'Login'
    },
    {
      path: '/',
      redirect:'/Welcome'
    },
    {
      path:'/home',
      component: Home,
      name: 'Home',
      redirect:'Customer',
      children:[
        {
          path: '/welcome',
          component: Welcome,
          name: 'Welcome',
        },
        {
          path: '/customer',
          component: Customer,
          name: 'Customer',
        },
        {
          path: '/post',
          component: Post,
          name: 'Post',
        },
        {
          path: '/postType',
          component: PostType,
          name: 'PostType',
        },
        {
          path: '/postTypeAll',
          component: PostTypeAll,
          name: 'PostTypeAll',
          
        },
        {
          path: '/postDetail',
          component: PostDetail,
          name: 'PostDetail',
        },
        {
          path: '/postComment',
          component: PostComment,
          name: 'PostComment',
        },

        
        {
          path: '/SendPost',
          component: SendPost,
          name: 'SendPost',
        },
        {
          path: '/circle',
          component: Circle,
          name: 'Circle',
        },
        {
          path: '/circleType',
          component: CircleType,
          name: 'CircleType',
        },
        {
          path: '/circleExamine',
          component: CircleExamine,
          name: 'CircleExamine',
        },
        {
          path: '/circleAdmin',
          component: CircleAdmin,
          name: 'CircleAdmin',
        },
        {
          path: '/experience',
          component: Experience,
          name: 'Experience',
        },
        {
          path: '/systemMsgList',
          component: SystemMsgList,
          name: 'SystemMsgList',
        },
        {
          path: '/systemMsgEditor',
          component: SystemMsgEditor,
          name: 'SystemMsgEditor',
        },
        {
          path:'/report',
          component:Report,
          name:'Report',
          redirect:'/reportList',
          children:[
            {
              path: '/reportList',
              component: ReportList,
              name: 'ReportList',
            },
            {
              path: '/reportReason',
              component: ReportReason,
              name: 'ReportReason',
            }
          ]
        },
        {
          path:'/intergal',
          component:Intergal,
          name:'Intergal',
          redirect:'/goodsList',
          children:[
            {
              path: '/goodsList',
              component: GoodsList,
              name: 'GoodsList',
            },
            {
              path: '/exchangeList',
              component: ExchangeList,
              name: 'ExchangeList',
            }
          ]
        },
        {
          path: '/account',
          component: Account,
          name: 'Account',
          
        },
        {
          path: '/goodsEditor',
          component: GoodsEditor,
          name: 'GoodsEditor',
        },
        {
          path: '/goodsBanner',
          component: GoodsBanner,
          name: 'GoodsBanner',
        },
        
        { 
          path: '/orderDetail',
          component: OrderDetail,
          name: 'OrderDetail',
          
        },
        { 
          path: '/goodsDetail',
          component: GoodsDetail,
          name: 'GoodsDetail',
          
        },
        { 
          path: '/orderDetail',
          component: OrderDetail,
          name: 'OrderDetail',
          
        },
        {
          path: '/administrator',
          component: Administrator,
          name: 'Administrator',
        },
        {
          path: '/character',
          component: Character,
          name: 'Character',
        },
        {
          path:'/banner',
          component:Banner,
          name:'Banner',
          redirect:'/bannerHomepage',
          children:[
            {
              path: '/bannerHomepage',
              component: BannerHomepage,
              name: 'BannerHomepage',
            },
            {
              path: '/bannerPersonpage',
              component: BannerPersonpage,
              name: 'BannerPersonpage',
            }
          ]
        },
      ],
    }
  ]
})
